package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.awt.*;
import java.math.BigDecimal;
import java.sql.Date;

@TableName("Book")
@Data
public class Book {

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id = 0;
    private String name;
    private BigDecimal price;
    private String author;
    /** 提交时间 **/
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date create_time;
    private String cover;

}
